//package com.vanke.activiti.service.impl;
//
//import com.vanke.activiti.constant.Constant;
//import com.vanke.activiti.service.TestService;
//import lombok.extern.slf4j.Slf4j;
//import org.activiti.engine.ProcessEngine;
//import org.activiti.engine.RepositoryService;
//import org.activiti.engine.repository.Deployment;
//import org.activiti.engine.repository.ProcessDefinition;
//
//
//import org.springframework.stereotype.Service;
//
//import javax.annotation.Resource;
//
//@Slf4j
//@Service
//public class TestServiceImpl implements TestService {
//
//
//    @Resource
//    private ProcessEngine processEngine;
//
//
//    @Override
//    public String createProcess() {
//        //部署
//        RepositoryService repositoryService = processEngine.getRepositoryService();
//        repositoryService.createDeployment().addClasspathResource("processes/holiday.bpmn").deploy();
//        //验证
//        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
////        List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery().list();
////        System.out.println(list.toString());
//
////        Assert.assertEquals(processDefinition,Constant.ACTIVITI_BPMN_HOLIDAY_DEFINITION_KEY);
//        return processDefinition.getId();
//
////        return null;
////        log.info("createProcess");
//
//    }
//
//    public String deploymentProcessDefinition() {
//        Deployment deployment = processEngine.getRepositoryService()
//                .createDeployment()
//                .name("activity流程实例")
//                .addClasspathResource("processes/holiday.bpmn")
//                .deploy();
//        System.out.println(deployment.getId());
//        System.out.println(deployment.getName());
//        return deployment.getId();
//    }
//
//    @Override
//    public void queryProcessHistrory() {
//
//    }
//
//    @Override
//    public void queryRuntimeProcess() {
//
//    }
//
//    @Override
//    public boolean completeTaskByApproverId() {
//        return false;
//    }
//}
